<template>
    <view class="invitation">
        <div class="logo">
                <img src="@/static/icon/logo.png" alt="" @tap='back'>
        </div>
       <div class="ewm" v-if="qrsrc">
           <img :src="qrsrc">
           <p>邀请码：ABDJSN12</p>
       </div>
       <button class="btn">立即分享</button>
    </view>
</template>

<script>
import qr from '@/utils/wxqrcode.js'
export default {
    data() {
        return {
            qrsrc:''
        };
    },
    onReady() {  
        this.qrsrc = qr.createQrCodeImg('123')
        console.log(this.qrsrc)
    }, 
    methods: {
        back() {
            uni.navigateBack();
        }
    }
};
</script>

<style lang="less">
.invitation{
    width: 100%;
    height: 100vh;
    // background: url('~@/static/invitation/1.png') no-repeat;
    background: url("");
    background-size: 100% auto;

    .logo{
        text-align:center;
        padding-top: 50upx;
        img{
            width: 139upx;
            height: 139upx;
        }
    }

    .ewm{
        width: 100%;
        position: absolute;
        top: 829upx;
        text-align: center;
        img{
            width: 242upx;
            height: 242upx;
        }
        p{font-size: 24upx;color: #fff}
    }
    .btn{
        width: 242upx;
        height: 60upx;
        line-height: 60upx;
        background: url('~@/static/ivn/0.png') no-repeat;
        background-size: 100% 100%;
        font-size: 30upx;
        color: #fff;
        position: absolute;
        top: 1150upx;
        left: 254upx;
    }
}
</style>
